#ifndef TASKDIALOG_H
#define TASKDIALOG_H

#include <QtGui/QDialog>
#include "database.h"

namespace Ui {
    class TaskDialog;
}

namespace acidone
{

class WorkflowBase;
class CategoryManager;

class TaskDialog : public QDialog
{
    Q_OBJECT

public:
	explicit TaskDialog(Task& task,
						const WorkflowBase* workflow,
						Database::Subjects subjects,
						QWidget *parent = 0);
    ~TaskDialog();

	Task* detachTask();

public slots:
	void accept();
	void updateActions();

private slots:
	void selectCategoryEx();

private:
	Ui::TaskDialog *ui;
	Task* m_task;

	Category* m_mainCategory;
	Database::Categories m_optionalCategories;

	const CategoryManager* m_categoryManager;
};

}

#endif // NEWTASKDIALOG_H
